package com.atguigu.mycloud.controller;

import com.atguigu.mycloud.Enum.ReturnMessage;
import com.atguigu.mycloud.entity.Pay;
import com.atguigu.mycloud.service.PayFeignAPI;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 任浩
 * @version 1.0
 */

@RestController
public class PayController {

    @Resource
    PayFeignAPI payFeignAPI;

    @GetMapping("/feign/pay/get/{id}")
    public ReturnMessage<Pay> get(@PathVariable("id")Integer id){
        System.out.println("这是通过openFeign进行调用");
        ReturnMessage<Pay> payReturnMessage = payFeignAPI.get(id);
        return payReturnMessage;
    }
}
